package top.codecrab.cloudalibaba.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import top.codecrab.springcloud.entity.response.Result;

/**
 * @author codecrab
 * @since 2021年05月21日 16:40
 */
@RequestMapping("/storage")
@FeignClient("seata-storage-service")
public interface StorageClient {

    /**
     * 扣减库存
     */
    @PostMapping("/decrease")
    Result decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
}



